#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
# export DH_VERBOSE=1

# This is the debhelper compatibility version to use.

export DH_COMPAT=5
PYTHON2.5 = /usr/bin/python2.5

# Package's name
PACKAGE=abacum

# Package's build directory
PACKAGEDIR=debian/${PACKAGE}

# Final name
LIBNAME=Abacum
	
configure: configure-stamp

configure-stamp:
	dh_testdir
	touch configure-stamp

build: build-stamp
	# dh_testdir

build-stamp: configure-stamp
	dh_testdir
	$(PYTHON2.5) setup.py doc
	$(PYTHON2.5) setup.py build_py
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp
	rm -rf build
	rm -rf *.egg-info
	rm -rf doc/*.html
	rm -rf debian/$(PACKAGE)
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs
	$(PYTHON2.5) setup.py build_py --no-compile --build-lib=$(PACKAGEDIR)/usr/lib/python2.5/site-packages/
	# $(PYTHON2.5) setup.py build_scripts --build-dir=$(PACKAGEDIR)/usr/share/${PACKAGE}/demo/
	dh_installdocs
	dh_install
	
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_link
	dh_compress
	# dh_pysupport
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb 


binary-arch: build install
# We have nothing to do here.

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
